package com.iut2.projet2013;

import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;

public class ShowImage extends FragmentActivity {

	private Bundle mData;
	private Button addContact;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.details);

		mData = getIntent().getExtras();
		Bitmap image = (Bitmap) mData.getParcelable("Bitmap");

		ImageView bitmapImage = (ImageView) findViewById(R.id.bitmap_image);
		bitmapImage.setImageBitmap(image);
		
		 addContact = (Button) findViewById(R.id.buttonAddContact);
		 addContact.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				startActivity(new Intent(ShowImage.this, ContactsList.class));
			}
		 });
	}
}
